//判断是否为正确的手机号码
function isPhone(number) {
  return (/^1\d{10}$/).test(number)
}

function isIdCard(idcard) {
  const regIdCard = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
  return regIdCard.test(idcard)
}

function isBankCard(data) {
  const regExp = /^([1-9]{1})(\d{15}|\d{18})$/;
  return regExp.test(data)
}

module.exports = {
  isPhone,
  isIdCard,
  isBankCard,
}